home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / desktop.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  5KB  |  160 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Paolo Maggi <paolo.maggi@polito.it>
  5.  Copyright (C) 2003 Paolo Maggi <paolo.maggi@polito.it>
  6.  Copyright (C) 2006 Luca Cavalli <lcavalli@cvs.gnome.org>
  7.  
  8.  This library is free software; you can redistribute it and/or
  9.  modify it under the terms of the GNU Library General Public
  10.  License as published by the Free Software Foundation; either
  11.  version 2 of the License, or (at your option) any later version.
  12.  
  13.  This library is distributed in the hope that it will be useful,
  14.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  Library General Public License for more details.
  17.  
  18.  You should have received a copy of the GNU Library General Public
  19.  License along with this library; if not, write to the
  20.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.  Boston, MA 02111-1307, USA.
  22.  
  23. -->
  24. <language id="desktop" _name=".desktop" version="2.0" _section="Others">
  25.   <metadata>
  26.     <property name="mimetypes">application/x-gnome-app-info;application/x-desktop</property>
  27.     <property name="globs">*.desktop;*.kdelnk</property>
  28.     <property name="line-comment-start">#</property>
  29.   </metadata>
  30.  
  31.   <styles>
  32.     <style id="group" _name="Group" map-to="def:keyword"/>
  33.     <!-- Translators: "Key" here means key value, that is the left hand
  34.          side in a myoption=something line in a .desktop file -->
  35.     <style id="key" _name="Key" map-to="def:type"/>
  36.     <style id="language" _name="Translation" map-to="def:decimal"/>
  37.     <style id="number" _name="Number" map-to="def:floating-point"/>
  38.     <style id="boolean" _name="Boolean" map-to="def:floating-point"/>
  39.     <style id="exec-parameter" _name="Exec parameter" map-to="def:floating-point"/>
  40.     <style id="encoding" _name="Encoding" map-to="def:floating-point"/>
  41.     <style id="category" _name="Category" map-to="def:floating-point"/>
  42.   </styles>
  43.  
  44.   <definitions>
  45.     <define-regex id="key-suffix">(?=(\[[a-zA-Z_]+\])?\s*=\s*)</define-regex>
  46.  
  47.     <context id="group" style-ref="group">
  48.       <start>^\[</start>
  49.       <end>\]$</end>
  50.     </context>
  51.  
  52.     <context id="language" style-ref="language">
  53.       <match>\[[a-zA-Z_]+\]</match>
  54.     </context>
  55.  
  56.     <context id="boolean" style-ref="boolean">
  57.       <keyword>true</keyword>
  58.       <keyword>false</keyword>
  59.     </context>
  60.  
  61.     <context id="exec-parameter" style-ref="exec-parameter">
  62.       <match>%[fFuUdDnNimckv%]</match>
  63.     </context>
  64.  
  65.     <context id="encoding" style-ref="encoding">
  66.       <keyword>UTF\-8</keyword>
  67.       <keyword>Legacy\-Mixed</keyword>
  68.     </context>
  69.  
  70.     <context id="number" style-ref="number">
  71.       <match>(.\b[0-9]+([Ll]?|[Ff]?)\b)|(b[0-9]*\.\W)</match>
  72.     </context>
  73.  
  74.     <context id="standard-key" style-ref="key">
  75.       <prefix>^_?</prefix>
  76.       <suffix>\%{key-suffix}</suffix>
  77.       <keyword>Actions</keyword>
  78.       <keyword>BinaryPattern</keyword>
  79.       <keyword>Categories</keyword>
  80.       <keyword>Comment</keyword>
  81.       <keyword>DefaultApp</keyword>
  82.       <keyword>Dev</keyword>
  83.       <keyword>Encoding</keyword>
  84.       <keyword>Exec</keyword>
  85.       <keyword>Extensions</keyword>
  86.       <keyword>FilePattern</keyword>
  87.       <keyword>FSType</keyword>
  88.       <keyword>GenericName</keyword>
  89.       <keyword>Hidden</keyword>
  90.       <keyword>Icon</keyword>
  91.       <keyword>MapNotify</keyword>
  92.       <keyword>MimeType</keyword>
  93.       <keyword>MiniIcon</keyword>
  94.       <keyword>MountPoint</keyword>
  95.       <keyword>Name</keyword>
  96.       <keyword>NoDisplay</keyword>
  97.       <keyword>NotShowIn</keyword>
  98.       <keyword>OnlyShowIn</keyword>
  99.       <keyword>Path</keyword>
  100.       <keyword>Patterns</keyword>
  101.       <keyword>Protocols</keyword>
  102.       <keyword>ReadOnly</keyword>
  103.       <keyword>SortOrder</keyword>
  104.       <keyword>StartupNotify</keyword>
  105.       <keyword>StartupWMClass</keyword>
  106.       <keyword>SwallowExec</keyword>
  107.       <keyword>SwallowTitle</keyword>
  108.       <keyword>Terminal</keyword>
  109.       <keyword>TerminalOptions</keyword>
  110.       <keyword>TryExec</keyword>
  111.       <keyword>Type</keyword>
  112.       <keyword>UnmountIcon</keyword>
  113.       <keyword>URL</keyword>
  114.       <keyword>Version</keyword>
  115.     </context>
  116.  
  117.     <context id="non-standard-key" style-ref="key">
  118.       <match>^_?X\-[a-zA-Z\-]+\%{key-suffix}</match>
  119.     </context>
  120.  
  121.     <context id="key-categories" end-at-line-end="true">
  122.       <start>^(_?Categories)\%{key-suffix}</start>
  123.       <include>
  124.         <context sub-pattern="1" where="start" style-ref="key"/>
  125.         <context style-ref="category">
  126.           <keyword>Application</keyword>
  127.           <keyword>Utility</keyword>
  128.           <keyword>TextEditor</keyword>
  129.         </context>
  130.       </include>
  131.     </context>
  132.  
  133.     <context id="key">
  134.       <include>
  135.         <context ref="key-categories"/>
  136.         <context ref="standard-key"/>
  137.         <context ref="non-standard-key"/>
  138.       </include>
  139.     </context>
  140.  
  141.     <context id="desktop">
  142.       <include>
  143.         <context ref="def:shell-like-comment"/>
  144.         <context ref="group"/>
  145.         <context ref="key"/>
  146.         <context id="lang-and-value" end-at-line-end="true">
  147.           <start>(\[[a-zA-Z_]+\])?\s*=\s*</start>
  148.           <include>
  149.             <context sub-pattern="1" where="start" style-ref="language"/>
  150.             <context ref="boolean"/>
  151.             <context ref="exec-parameter"/>
  152.             <context ref="encoding"/>
  153.             <context ref="number"/>
  154.           </include>
  155.         </context>
  156.       </include>
  157.     </context>
  158.   </definitions>
  159. </language>
  160.